package my.sample.junk;

import java.nio.ByteBuffer;

public class Byte2Long {

	public static void main(String[] args) {

		
		ByteBuffer value = ByteBuffer.allocate(4);
		value.putInt(12345);
		value.flip();
		System.out.println(byte2long(value.array()));


	}

	public static long byte2long(byte[] value) {
		return ((ByteBuffer) ByteBuffer.allocate(8).put(value, 0, value.length).flip()).getLong();
	}

}
